import request from '@/utils/request'

export const VehicleTypeApi = {
  /**
     *  车型列表
     * @returns
     */
  getPage: (data) => {
    return request({
      url: '/manage/user/vehicleType/getPage',
      data,
      method: 'post'
    })
  },

  /**
     *  车型列表
     * @returns
     */
  getList: (vehicleTypeIds) => {
    return request({
      url: '/manage/user/vehicleType/getList',
      data: vehicleTypeIds,
      method: 'post'
    })
  },

  /**
     *  更新排序
     * @returns
     */
  updateSort: (data) => {
    return request({
      url: '/manage/user/vehicleType/updateSort',
      data,
      method: 'post'
    })
  },

  /**
     *  更新状态
     * @returns
     */
  updateStatus: (data) => {
    return request({
      url: '/manage/user/vehicleType/updateStatus',
      data,
      method: 'post'
    })
  },

  /**
     *  删除
     * @returns
     */
  delete: (vehicleTypeId) => {
    return request({
      url: '/manage/user/vehicleType/delete',
      params: { vehicleTypeId },
      method: 'get'
    })
  },

  /**
     *  获取详细信息
     * @returns
     */
  getInfoById: (vehicleTypeId) => {
    return request({
      url: '/manage/user/vehicleType/getInfoById',
      params: { vehicleTypeId },
      method: 'get'
    })
  },

  /**
     *  更新
     * @returns
     */
  update: (data) => {
    return request({
      url: '/manage/user/vehicleType/update',
      data,
      method: 'post'
    })
  },

  /**
     *  插入
     * @returns
     */
  insert: (data) => {
    return request({
      url: '/manage/user/vehicleType/insert',
      data,
      method: 'post'
    })
  }
}
